/*
this file is for debug support
*/
#if (0)
#include "p24Fxxxx.h"
#include <stdio.h>

unsigned char outputbuffer[0x100];
volatile unsigned char *writereg = &outputbuffer[0];
int write(int handle, void *buffer, unsigned int len);
/*
overwrite the write() to re-direct the printf output
*/
int
write(int handle, void *buffer, unsigned int len)
{
int i;

/*
handle 0 corresponds to stdout
handle 1 corresponds to stdin
handle 2 corresponds to stderr
*/
switch (handle)
{
case 0:
case 1:
case 2:
default:
for (i = len; i; --i)
{
/* change to write to some peripheral */
*writereg++ = *(char*)buffer++;
}
}
return(len);
}

#endif
